package com.ylx.mapper;

import com.ylx.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {


    @Select("select * from user where username=#{username} and password=#{password} and role=#{role}")
    User select (@Param("username") String username, @Param("password") String password, @Param("role") String role);

    @Select("select * from user where username=#{username} and password=#{password} ")
    User select1 (@Param("username") String username, @Param("password") String password );

    User selcetByUsername (String username);


    void add (User user);

    int updateZp (User user);

    User selectUserByUid(String uid);
     @Insert("insert into sss values (null,#{tstitle},#{tscontent},#{tspicture})")
     void  addone (@Param("tstitle") String tstitle, @Param("tscontent") String tscontent, @Param("tspicture") String tspicture);

}
